Optimal. Leaf size=505 \[ \frac {\sin (c+d x) \left (7 a^2 C-5 a b B+5 A b^2-2 b^2 C\right )}{5 b^2 d \left (a^2-b^2\right ) \sec ^{\frac {3}{2}}(c+d x)}-\frac {\sin (c+d x) \left (A b^2-a (b B-a C)\right )}{b d \left (a^2-b^2\right ) \sec ^{\frac {5}{2}}(c+d x) (a+b \cos (c+d x))}+\frac {\sin (c+d x) \left (-7 a^3 C+5 a^2 b B-a b^2 (3 A-4 C)-2 b^3 B\right )}{3 b^3 d \left (a^2-b^2\right ) \sqrt {\sec (c+d x)}}-\frac {\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \left (-35 a^4 C+25 a^3 b B-3 a^2 b^2 (5 A-8 C)-20 a b^3 B+2 b^4 (5 A+3 C)\right )}{5 b^4 d \left (a^2-b^2\right )}-\frac {a^2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \left (-7 a^4 C+5 a^3 b B-3 a^2 b^2 (A-3 C)-7 a b^3 B+5 A b^4\right ) \Pi \left (\frac {2 b}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{b^5 d (a-b) (a+b)^2}+\frac {\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \left (-21 a^5 C+15 a^4 b B-a^3 b^2 (9 A-20 C)-16 a^2 b^3 B+4 a b^4 (3 A+C)-2 b^5 B\right )}{3 b^5 d \left (a^2-b^2\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 1.81, antiderivative size = 505, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.186, Rules used = {4221, 3047, 3049, 3059, 2639, 3002, 2641, 2805} \[ \frac {\sin (c+d x) \left (7 a^2 C-5 a b B+5 A b^2-2 b^2 C\right )}{5 b^2 d \left (a^2-b^2\right ) \sec ^{\frac {3}{2}}(c+d x)}+\frac {\sin (c+d x) \left (5 a^2 b B-7 a^3 C-a b^2 (3 A-4 C)-2 b^3 B\right )}{3 b^3 d \left (a^2-b^2\right ) \sqrt {\sec (c+d x)}}-\frac {\sin (c+d x) \left (A b^2-a (b B-a C)\right )}{b d \left (a^2-b^2\right ) \sec ^{\frac {5}{2}}(c+d x) (a+b \cos (c+d x))}+\frac {\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \left (-a^3 b^2 (9 A-20 C)-16 a^2 b^3 B+15 a^4 b B-21 a^5 C+4 a b^4 (3 A+C)-2 b^5 B\right )}{3 b^5 d \left (a^2-b^2\right )}-\frac {\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \left (-3 a^2 b^2 (5 A-8 C)+25 a^3 b B-35 a^4 C-20 a b^3 B+2 b^4 (5 A+3 C)\right )}{5 b^4 d \left (a^2-b^2\right )}-\frac {a^2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \left (-3 a^2 b^2 (A-3 C)+5 a^3 b B-7 a^4 C-7 a b^3 B+5 A b^4\right ) \Pi \left (\frac {2 b}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{b^5 d (a-b) (a+b)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2639
Rule 2641
Rule 2805
Rule 3002
Rule 3047
Rule 3049
Rule 3059
Rule 4221
Rubi steps
\begin {align*} \int \frac {A+B \cos (c+d x)+C \cos ^2(c+d x)}{(a+b \cos (c+d x))^2 \sec ^{\frac {5}{2}}(c+d x)} \, dx &=\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\cos ^{\frac {5}{2}}(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^2} \, dx\\ &=-\frac {\left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{b \left (a^2-b^2\right ) d (a+b \cos (c+d x)) \sec ^{\frac {5}{2}}(c+d x)}-\frac {\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\cos ^{\frac {3}{2}}(c+d x) \left (\frac {5}{2} \left (A b^2-a (b B-a C)\right )+b (b B-a (A+C)) \cos (c+d x)-\frac {1}{2} \left (5 A b^2-5 a b B+7 a^2 C-2 b^2 C\right ) \cos ^2(c+d x)\right )}{a+b \cos (c+d x)} \, dx}{b \left (a^2-b^2\right )}\\ &=-\frac {\left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{b \left (a^2-b^2\right ) d (a+b \cos (c+d x)) \sec ^{\frac {5}{2}}(c+d x)}+\frac {\left (5 A b^2-5 a b B+7 a^2 C-2 b^2 C\right ) \sin (c+d x)}{5 b^2 \left (a^2-b^2\right ) d \sec ^{\frac {3}{2}}(c+d x)}-\frac {\left (2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sqrt {\cos (c+d x)} \left (-\frac {3}{4} a \left (5 A b^2-5 a b B+7 a^2 C-2 b^2 C\right )+\frac {1}{2} b \left (5 A b^2-5 a b B+2 a^2 C+3 b^2 C\right ) \cos (c+d x)-\frac {5}{4} \left (5 a^2 b B-2 b^3 B-a b^2 (3 A-4 C)-7 a^3 C\right ) \cos ^2(c+d x)\right )}{a+b \cos (c+d x)} \, dx}{5 b^2 \left (a^2-b^2\right )}\\ &=-\frac {\left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{b \left (a^2-b^2\right ) d (a+b \cos (c+d x)) \sec ^{\frac {5}{2}}(c+d x)}+\frac {\left (5 A b^2-5 a b B+7 a^2 C-2 b^2 C\right ) \sin (c+d x)}{5 b^2 \left (a^2-b^2\right ) d \sec ^{\frac {3}{2}}(c+d x)}+\frac {\left (5 a^2 b B-2 b^3 B-a b^2 (3 A-4 C)-7 a^3 C\right ) \sin (c+d x)}{3 b^3 \left (a^2-b^2\right ) d \sqrt {\sec (c+d x)}}-\frac {\left (4 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {-\frac {5}{8} a \left (5 a^2 b B-2 b^3 B-a b^2 (3 A-4 C)-7 a^3 C\right )+\frac {1}{4} b \left (10 a^2 b B+5 b^3 B-14 a^3 C-a b^2 (15 A+C)\right ) \cos (c+d x)+\frac {3}{8} \left (25 a^3 b B-20 a b^3 B-3 a^2 b^2 (5 A-8 C)-35 a^4 C+2 b^4 (5 A+3 C)\right ) \cos ^2(c+d x)}{\sqrt {\cos (c+d x)} (a+b \cos (c+d x))} \, dx}{15 b^3 \left (a^2-b^2\right )}\\ &=-\frac {\left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{b \left (a^2-b^2\right ) d (a+b \cos (c+d x)) \sec ^{\frac {5}{2}}(c+d x)}+\frac {\left (5 A b^2-5 a b B+7 a^2 C-2 b^2 C\right ) \sin (c+d x)}{5 b^2 \left (a^2-b^2\right ) d \sec ^{\frac {3}{2}}(c+d x)}+\frac {\left (5 a^2 b B-2 b^3 B-a b^2 (3 A-4 C)-7 a^3 C\right ) \sin (c+d x)}{3 b^3 \left (a^2-b^2\right ) d \sqrt {\sec (c+d x)}}+\frac {\left (4 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\frac {5}{8} a b \left (5 a^2 b B-2 b^3 B-a b^2 (3 A-4 C)-7 a^3 C\right )+\frac {5}{8} \left (15 a^4 b B-16 a^2 b^3 B-2 b^5 B-a^3 b^2 (9 A-20 C)-21 a^5 C+4 a b^4 (3 A+C)\right ) \cos (c+d x)}{\sqrt {\cos (c+d x)} (a+b \cos (c+d x))} \, dx}{15 b^4 \left (a^2-b^2\right )}-\frac {\left (\left (25 a^3 b B-20 a b^3 B-3 a^2 b^2 (5 A-8 C)-35 a^4 C+2 b^4 (5 A+3 C)\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \sqrt {\cos (c+d x)} \, dx}{10 b^4 \left (a^2-b^2\right )}\\ &=-\frac {\left (25 a^3 b B-20 a b^3 B-3 a^2 b^2 (5 A-8 C)-35 a^4 C+2 b^4 (5 A+3 C)\right ) \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{5 b^4 \left (a^2-b^2\right ) d}-\frac {\left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{b \left (a^2-b^2\right ) d (a+b \cos (c+d x)) \sec ^{\frac {5}{2}}(c+d x)}+\frac {\left (5 A b^2-5 a b B+7 a^2 C-2 b^2 C\right ) \sin (c+d x)}{5 b^2 \left (a^2-b^2\right ) d \sec ^{\frac {3}{2}}(c+d x)}+\frac {\left (5 a^2 b B-2 b^3 B-a b^2 (3 A-4 C)-7 a^3 C\right ) \sin (c+d x)}{3 b^3 \left (a^2-b^2\right ) d \sqrt {\sec (c+d x)}}-\frac {\left (a^2 \left (5 A b^4+5 a^3 b B-7 a b^3 B-3 a^2 b^2 (A-3 C)-7 a^4 C\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)} (a+b \cos (c+d x))} \, dx}{2 b^5 \left (a^2-b^2\right )}+\frac {\left (\left (15 a^4 b B-16 a^2 b^3 B-2 b^5 B-a^3 b^2 (9 A-20 C)-21 a^5 C+4 a b^4 (3 A+C)\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx}{6 b^5 \left (a^2-b^2\right )}\\ &=-\frac {\left (25 a^3 b B-20 a b^3 B-3 a^2 b^2 (5 A-8 C)-35 a^4 C+2 b^4 (5 A+3 C)\right ) \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{5 b^4 \left (a^2-b^2\right ) d}+\frac {\left (15 a^4 b B-16 a^2 b^3 B-2 b^5 B-a^3 b^2 (9 A-20 C)-21 a^5 C+4 a b^4 (3 A+C)\right ) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{3 b^5 \left (a^2-b^2\right ) d}-\frac {a^2 \left (5 A b^4+5 a^3 b B-7 a b^3 B-3 a^2 b^2 (A-3 C)-7 a^4 C\right ) \sqrt {\cos (c+d x)} \Pi \left (\frac {2 b}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{(a-b) b^5 (a+b)^2 d}-\frac {\left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{b \left (a^2-b^2\right ) d (a+b \cos (c+d x)) \sec ^{\frac {5}{2}}(c+d x)}+\frac {\left (5 A b^2-5 a b B+7 a^2 C-2 b^2 C\right ) \sin (c+d x)}{5 b^2 \left (a^2-b^2\right ) d \sec ^{\frac {3}{2}}(c+d x)}+\frac {\left (5 a^2 b B-2 b^3 B-a b^2 (3 A-4 C)-7 a^3 C\right ) \sin (c+d x)}{3 b^3 \left (a^2-b^2\right ) d \sqrt {\sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 7.37, size = 831, normalized size = 1.65 \[ \frac {\frac {2 \left (35 C a^4-25 b B a^3+15 A b^2 a^2-32 b^2 C a^2+40 b^3 B a-30 A b^4-18 b^4 C\right ) \left (F\left (\left .\sin ^{-1}\left (\sqrt {\sec (c+d x)}\right )\right |-1\right )-\Pi \left (-\frac {a}{b};\left .\sin ^{-1}\left (\sqrt {\sec (c+d x)}\right )\right |-1\right )\right ) (b+a \sec (c+d x)) \sqrt {1-\sec ^2(c+d x)} \sin (c+d x) \cos ^2(c+d x)}{a (a+b \cos (c+d x)) \left (1-\cos ^2(c+d x)\right )}+\frac {2 \left (-20 B b^4+60 a A b^3+4 a C b^3-40 a^2 B b^2+56 a^3 C b\right ) \Pi \left (-\frac {a}{b};\left .\sin ^{-1}\left (\sqrt {\sec (c+d x)}\right )\right |-1\right ) (b+a \sec (c+d x)) \sqrt {1-\sec ^2(c+d x)} \sin (c+d x) \cos ^2(c+d x)}{b (a+b \cos (c+d x)) \left (1-\cos ^2(c+d x)\right )}+\frac {\left (105 C a^4-75 b B a^3+45 A b^2 a^2-72 b^2 C a^2+60 b^3 B a-30 A b^4-18 b^4 C\right ) \cos (2 (c+d x)) (b+a \sec (c+d x)) \left (-4 \Pi \left (-\frac {a}{b};\left .\sin ^{-1}\left (\sqrt {\sec (c+d x)}\right )\right |-1\right ) \sqrt {\sec (c+d x)} \sqrt {1-\sec ^2(c+d x)} a^2+4 b \sec ^2(c+d x) a-4 b a-4 b E\left (\left .\sin ^{-1}\left (\sqrt {\sec (c+d x)}\right )\right |-1\right ) \sqrt {\sec (c+d x)} \sqrt {1-\sec ^2(c+d x)} a+2 (2 a-b) b F\left (\left .\sin ^{-1}\left (\sqrt {\sec (c+d x)}\right )\right |-1\right ) \sqrt {\sec (c+d x)} \sqrt {1-\sec ^2(c+d x)}+2 b^2 \Pi \left (-\frac {a}{b};\left .\sin ^{-1}\left (\sqrt {\sec (c+d x)}\right )\right |-1\right ) \sqrt {\sec (c+d x)} \sqrt {1-\sec ^2(c+d x)}\right ) \sin (c+d x)}{a b^2 (a+b \cos (c+d x)) \left (1-\cos ^2(c+d x)\right ) \sqrt {\sec (c+d x)} \left (2-\sec ^2(c+d x)\right )}}{60 (a-b) b^3 (a+b) d}+\frac {\sqrt {\sec (c+d x)} \left (-\frac {\left (10 C a^4-10 b B a^3+10 A b^2 a^2-b^2 C a^2+b^4 C\right ) \sin (c+d x)}{10 b^4 \left (a^2-b^2\right )}-\frac {C \sin (c+d x) a^5-b B \sin (c+d x) a^4+A b^2 \sin (c+d x) a^3}{b^4 \left (b^2-a^2\right ) (a+b \cos (c+d x))}+\frac {(b B-2 a C) \sin (2 (c+d x))}{3 b^3}+\frac {C \sin (3 (c+d x))}{10 b^2}\right )}{d} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right ) + A}{{\left (b \cos \left (d x + c\right ) + a\right )}^{2} \sec \left (d x + c\right )^{\frac {5}{2}}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 11.90, size = 1382, normalized size = 2.74 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {C\,{\cos \left (c+d\,x\right )}^2+B\,\cos \left (c+d\,x\right )+A}{{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^{5/2}\,{\left (a+b\,\cos \left (c+d\,x\right )\right )}^2} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________